3.6 \(\int \csc ^3(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=53 \[ -\frac {(a+3 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f} \]

[Out]

-1/2*(a+3*b)*arctanh(cos(f*x+e))/f-1/2*(a+b)*cot(f*x+e)*csc(f*x+e)/f+b*sec(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4133, 456, 453, 206} \[ -\frac {(a+3 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

-((a + 3*b)*ArcTanh[Cos[e + f*x]])/(2*f) - ((a + b)*Cot[e + f*x]*Csc[e + f*x])/(2*f) + (b*Sec[e + f*x])/f

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 456

Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[((-a)^(m/2 - 1)*(b*c - a*d)*
x*(a + b*x^2)^(p + 1))/(2*b^(m/2 + 1)*(p + 1)), x] + Dist[1/(2*b^(m/2 + 1)*(p + 1)), Int[x^m*(a + b*x^2)^(p +
1)*ExpandToSum[2*b*(p + 1)*Together[(b^(m/2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d)*x^(-m + 2))/(a + b*x^2)]
 - ((-a)^(m/2 - 1)*(b*c - a*d))/x^m, x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &
& ILtQ[m/2, 0] && (IntegerQ[p] || EqQ[m + 2*p + 1, 0])

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \csc ^3(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {b+a x^2}{x^2 \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {\operatorname {Subst}\left (\int \frac {-2 b-(a+b) x^2}{x^2 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{2 f}\\ &=-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f}-\frac {(a+3 b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{2 f}\\ &=-\frac {(a+3 b) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {(a+b) \cot (e+f x) \csc (e+f x)}{2 f}+\frac {b \sec (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.38, size = 236, normalized size = 4.45 \[ -\frac {a \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {a \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {a \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {a \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {3 b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {3 b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}+\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}-\frac {b \sin \left (\frac {1}{2} (e+f x)\right )}{f \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^3*(a + b*Sec[e + f*x]^2),x]

[Out]

-1/8*(a*Csc[(e + f*x)/2]^2)/f - (b*Csc[(e + f*x)/2]^2)/(8*f) - (a*Log[Cos[(e + f*x)/2]])/(2*f) - (3*b*Log[Cos[
(e + f*x)/2]])/(2*f) + (a*Log[Sin[(e + f*x)/2]])/(2*f) + (3*b*Log[Sin[(e + f*x)/2]])/(2*f) + (a*Sec[(e + f*x)/
2]^2)/(8*f) + (b*Sec[(e + f*x)/2]^2)/(8*f) + (b*Sin[(e + f*x)/2])/(f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])) -
(b*Sin[(e + f*x)/2])/(f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]))

________________________________________________________________________________________

fricas [B]  time = 0.81, size = 124, normalized size = 2.34 \[ \frac {2 \, {\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{2} - {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 3 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{3} - {\left (a + 3 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 4 \, b}{4 \, {\left (f \cos \left (f x + e\right )^{3} - f \cos \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/4*(2*(a + 3*b)*cos(f*x + e)^2 - ((a + 3*b)*cos(f*x + e)^3 - (a + 3*b)*cos(f*x + e))*log(1/2*cos(f*x + e) + 1
/2) + ((a + 3*b)*cos(f*x + e)^3 - (a + 3*b)*cos(f*x + e))*log(-1/2*cos(f*x + e) + 1/2) - 4*b)/(f*cos(f*x + e)^
3 - f*cos(f*x + e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b+(1-cos(f*x+exp
(1)))/(1+cos(f*x+exp(1)))*a)/16+(-3*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b-((1-cos(f*x+exp(1)))/(1+cos(
f*x+exp(1))))^2*a-14*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b+b+a)*1/16/(((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(
1))))^2-(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))-(-3*b-a)/8*ln(abs(1-cos(f*x+exp(1)))/abs(1+cos(f*x+exp(1)))))

________________________________________________________________________________________

maple [B]  time = 0.97, size = 100, normalized size = 1.89 \[ -\frac {a \cot \left (f x +e \right ) \csc \left (f x +e \right )}{2 f}+\frac {a \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f}-\frac {b}{2 f \sin \left (f x +e \right )^{2} \cos \left (f x +e \right )}+\frac {3 b}{2 f \cos \left (f x +e \right )}+\frac {3 b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^3*(a+b*sec(f*x+e)^2),x)

[Out]

-1/2*a*cot(f*x+e)*csc(f*x+e)/f+1/2/f*a*ln(csc(f*x+e)-cot(f*x+e))-1/2/f*b/sin(f*x+e)^2/cos(f*x+e)+3/2/f*b/cos(f
*x+e)+3/2/f*b*ln(csc(f*x+e)-cot(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.39, size = 76, normalized size = 1.43 \[ -\frac {{\left (a + 3 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - {\left (a + 3 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left ({\left (a + 3 \, b\right )} \cos \left (f x + e\right )^{2} - 2 \, b\right )}}{\cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^3*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/4*((a + 3*b)*log(cos(f*x + e) + 1) - (a + 3*b)*log(cos(f*x + e) - 1) - 2*((a + 3*b)*cos(f*x + e)^2 - 2*b)/(
cos(f*x + e)^3 - cos(f*x + e)))/f

________________________________________________________________________________________

mupad [B]  time = 4.20, size = 62, normalized size = 1.17 \[ \frac {b-{\cos \left (e+f\,x\right )}^2\,\left (\frac {a}{2}+\frac {3\,b}{2}\right )}{f\,\left (\cos \left (e+f\,x\right )-{\cos \left (e+f\,x\right )}^3\right )}-\frac {\mathrm {atanh}\left (\cos \left (e+f\,x\right )\right )\,\left (\frac {a}{2}+\frac {3\,b}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)/sin(e + f*x)^3,x)

[Out]

(b - cos(e + f*x)^2*(a/2 + (3*b)/2))/(f*(cos(e + f*x) - cos(e + f*x)^3)) - (atanh(cos(e + f*x))*(a/2 + (3*b)/2
))/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \csc ^{3}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**3*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*csc(e + f*x)**3, x)

________________________________________________________________________________________